<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>得圣官方APP下载</title>

    <!-- OpenInstall 集成代码 -->
    <script type="text/javascript" charset="UTF-8" src="https://res.openinstall.com/openinstall-v7gc7x.js"></script>

    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 性能优化 */
        .container,
        .download-btn,
        .feature-icon,
        .app-icon {
            will-change: transform;
        }

        /* 减少重绘 */
        .bg-animation,
        .floating-elements {
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
            background: url('downbeijing.png') no-repeat center center fixed;
            background-size: cover;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }

        /* 移除不必要的动画 */

        /* 主容器 */
        .container {
            background: transparent;
            border-radius: 0;
            padding: 0;
            max-width: 400px;
            width: 100%;
            height: 100vh;
            max-height: 100vh;
            box-shadow: none;
            animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            position: relative;
            overflow: hidden;
            border: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* 移除容器装饰 */

        @keyframes slideUp {
            0% {
                opacity: 0;
                transform: translateY(50px) scale(0.95);
                filter: blur(10px);
            }

            60% {
                transform: translateY(-5px) scale(1.02);
            }

            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
                filter: blur(0);
            }
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        /* Logo区域 */
        .logo-area {
            text-align: center;
            margin-bottom: 30px;
            display: none;
        }

        .app-icon {
            width: 90px;
            height: 90px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8, #1e40af);
            border-radius: 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3), 0 5px 15px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            animation: gentleFloat 4s ease-in-out infinite;
            position: relative;
            overflow: hidden;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .app-icon::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: rotate(45deg) translateX(-100%);
            animation: iconShine 6s infinite;
        }

        .app-icon:hover {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4), 0 8px 20px rgba(0, 0, 0, 0.2);
            animation-play-state: paused;
        }

        @keyframes gentleFloat {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-6px);
            }
        }

        @keyframes iconShine {

            0%,
            90% {
                transform: rotate(45deg) translateX(-100%);
            }

            100% {
                transform: rotate(45deg) translateX(100%);
            }
        }

        /* 简化波纹动画 */
        @keyframes ripple {
            to {
                transform: scale(1.5);
                opacity: 0;
            }
        }

        /* 添加加载动画 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #f8fafc, #e2e8f0);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            animation: fadeOut 1s ease-out 0.5s forwards;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 3px solid rgba(59, 130, 246, 0.3);
            border-top: 3px solid #3b82f6;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes fadeOut {
            to {
                opacity: 0;
                visibility: hidden;
            }
        }

        /* 增强悬停效果 */
        .app-name {
            transition: all 0.3s ease;
        }

        .logo-area:hover .app-name {
            transform: scale(1.05);
            color: #3b82f6;
        }

        .app-desc {
            transition: all 0.3s ease;
        }

        .logo-area:hover .app-desc {
            color: #1d4ed8;
        }

        .app-icon svg {
            width: 50px;
            height: 50px;
            fill: white;
        }

        .app-name {
            font-size: 24px;
            font-weight: bold;
            color: #1e293b;
            margin-bottom: 5px;
        }

        .app-desc {
            font-size: 14px;
            color: #475569;
        }

        /* 下载按钮 */
        .download-buttons {
            margin: 280px 0 0 0;
            position: relative;
            width: 280px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .download-btn {
            width: 100%;
            padding: 15px 20px;
            margin-bottom: 12px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            position: relative;
            will-change: transform;
            overflow: hidden;
        }

        .download-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .download-btn:hover::before {
            left: 100%;
        }

        .download-btn span,
        .download-btn .btn-icon {
            position: relative;
            z-index: 2;
        }

        .main-btn {
            background: #004fff;
            color: white;
            box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
            border: none;
            width: 160px;
        }

        .download-tip {
            color: #666;
            font-size: 12px;
            margin: 0;
            text-align: center;
        }

        .download-btn:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
        }

        .main-btn:hover {
            box-shadow: 0 12px 30px rgba(0, 122, 255, 0.4);
        }

        .download-btn:active {
            transform: translateY(-1px) scale(0.98);
        }

        .btn-icon {
            width: 24px;
            height: 24px;
            margin-right: 10px;
            fill: currentColor;
        }

        /* 微信提示遮罩 */
        .wechat-mask {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            z-index: 9999;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .wechat-mask.show {
            display: block;
        }

        .mask-content {
            padding: 20px;
            color: white;
            text-align: right;
        }

        .arrow {
            width: 0;
            height: 0;
            border-left: 20px solid transparent;
            border-right: 20px solid transparent;
            border-bottom: 30px solid white;
            position: absolute;
            top: 20px;
            right: 30px;
            animation: bounce 1s infinite;
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-10px);
            }
        }

        .mask-text {
            margin-top: 80px;
            font-size: 18px;
            line-height: 1.6;
        }

        /* 功能特性 */
        .features {
            display: none;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(59, 130, 246, 0.2);
        }

        .feature-item {
            display: flex;
            align-items: center;
            margin-bottom: 18px;
            opacity: 0;
            transform: translateX(-20px);
            animation: slideInFeature 0.6s ease-out forwards;
            transition: transform 0.2s ease;
        }

        .feature-item:nth-child(1) {
            animation-delay: 0.1s;
        }

        .feature-item:nth-child(2) {
            animation-delay: 0.2s;
        }

        .feature-item:nth-child(3) {
            animation-delay: 0.3s;
        }

        .feature-item:nth-child(4) {
            animation-delay: 0.4s;
        }

        .feature-item:hover {
            transform: translateX(5px);
        }

        @keyframes slideInFeature {
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .feature-icon {
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 16px;
            flex-shrink: 0;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
            transition: transform 0.2s ease;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .feature-item:hover .feature-icon {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
        }

        .feature-icon svg {
            width: 20px;
            height: 20px;
            fill: white;
        }

        .feature-text h3 {
            font-size: 14px;
            color: #1e293b;
            margin-bottom: 2px;
        }

        .feature-text p {
            font-size: 12px;
            color: #64748b;
        }

        /* 底部信息 */
        .footer {
            margin-top: 30px;
            text-align: center;
            font-size: 12px;
            color: #475569;
        }

        /* 响应式设计 */
        @media (max-width: 380px) {
            .container {
                padding: 30px 20px;
            }

            .app-name {
                font-size: 20px;
            }

            .download-btn {
                font-size: 15px;
                padding: 14px;
            }
        }
    </style>
</head>

<body>
    <!-- 加载动画 -->
    <div class="loading-overlay">
        <div class="loading-spinner"></div>
    </div>

    <!-- 移除背景动画 -->

    <div class="container">
        <!-- Logo区域 -->
        <div class="logo-area">
            <div class="app-icon" style="display: none;">
                <svg viewBox="0 0 24 24">
                    <path
                        d="M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,7C13.4,7 14.8,8.6 14.8,10V11H16V18H8V11H9.2V10C9.2,8.6 10.6,7 12,7M12,8.2C11.2,8.2 10.4,8.7 10.4,10V11H13.6V10C13.6,8.7 12.8,8.2 12,8.2Z" />
                </svg>
            </div>
            <div class="app-name">得圣APP下载</div>
        </div>

        <!-- 下载按钮 -->
        <div class="download-buttons">
            <button id="downloadButton" class="download-btn main-btn">
                <span>立即下载</span>
            </button>
            <p class="download-tip">若您尚未安装得圣APP,点击即可下载</p>
        </div>


    </div>

    <!-- 微信提示遮罩 -->
    <div class="wechat-mask" id="wechatMask">
        <div class="mask-content">
            <div class="arrow"></div>
            <div class="mask-text">
                <p>点击右上角 ···</p>
                <p>选择"在浏览器打开"</p>
                <p>即可下载安装</p>
            </div>
        </div>
    </div>

    <script>
        // OpenInstall 初始化
        var data = OpenInstall.parseUrlParams(); // openinstall-{appKey}.js中提供的api，解析当前网页url中的查询参数

        new OpenInstall({ // 初始化方法，与openinstall服务器交互，应尽早调用
            appKey: "v7gc7x", // appKey为openinstall为应用分配的唯一id（必须传入）
            // channelCode: data.channelCode || "", // 传入渠道编号，优先级大于链接上拼接的渠道编号
            fastInstall: true, // 快速安装功能开关，true为开启，false为关闭
            onready: function () { // 初始化成功回调方法。当初始化完成后，会自动进入
                this.schemeWakeup(); // 尝试使用scheme打开App（主要用于Android以及iOS的QQ环境中）
                var m = this, button = document.getElementById("downloadButton"); // 为button对象绑定对应id的元素
                button.onclick = function () { // 对应button的点击事件
                    m.wakeupOrInstall(); // 此方法为scheme、Universal Link唤醒以及引导下载的作用（必须调用且不可领外自定义）
                    return false;
                }
            },
            // 自定义遮罩层样式（当无法正常下载或拉起时显示）
            mask: function () {
                return `
                    <div style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); z-index: 9999; display: flex; align-items: flex-start; justify-content: flex-end; padding: 20px;">
                        <div style="color: white; text-align: right; margin-top: 60px;">
                            <div style="width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 30px solid white; margin: 0 auto 20px auto; animation: bounce 1s infinite;"></div>
                            <div style="font-size: 18px; line-height: 1.6;">
                                <p>点击右上角 ···</p>
                                <p>选择"在浏览器打开"</p>
                                <p>即可下载安装</p>
                            </div>
                        </div>
                    </div>
                `;
            }
        }, data); // 初始化时传入data，作为一键拉起/App传参安装时候的参数

        // 检测设备类型
        function getDeviceType() {
            const ua = navigator.userAgent;
            if (/android/i.test(ua)) {
                return 'android';
            }
            if (/iPad|iPhone|iPod/.test(ua) && !window.MSStream) {
                return 'ios';
            }
            return 'unknown';
        }

        // 点击遮罩关闭（保留原有功能）
        document.addEventListener('DOMContentLoaded', function () {
            const wechatMask = document.getElementById('wechatMask');
            if (wechatMask) {
                wechatMask.addEventListener('click', function () {
                    this.classList.remove('show');
                });
            }
        });

        // 简化的鼠标跟随效果（仅在桌面端启用）
        function initMouseEffect() {
            if (window.innerWidth > 768) {
                let ticking = false;

                document.addEventListener('mousemove', function (e) {
                    if (!ticking) {
                        requestAnimationFrame(function () {
                            const container = document.querySelector('.container');
                            if (container) {
                                const rect = container.getBoundingClientRect();
                                const centerX = rect.left + rect.width / 2;
                                const centerY = rect.top + rect.height / 2;

                                const deltaX = (e.clientX - centerX) * 0.01;
                                const deltaY = (e.clientY - centerY) * 0.01;

                                container.style.transform = `translate(${deltaX}px, ${deltaY}px)`;
                            }
                            ticking = false;
                        });
                        ticking = true;
                    }
                });
            }
        }

        // 简化按钮点击效果
        function createRipple(event) {
            const button = event.currentTarget;

            // 防抖处理
            if (button.dataset.rippling) return;
            button.dataset.rippling = 'true';

            const rect = button.getBoundingClientRect();
            const size = Math.min(rect.width, rect.height) * 0.8;
            const x = event.clientX - rect.left - size / 2;
            const y = event.clientY - rect.top - size / 2;

            const ripple = document.createElement('div');
            ripple.style.cssText = `
                position: absolute;
                width: ${size}px;
                height: ${size}px;
                left: ${x}px;
                top: ${y}px;
                background: rgba(255, 255, 255, 0.4);
                border-radius: 50%;
                transform: scale(0);
                animation: ripple 0.4s ease-out;
                pointer-events: none;
                z-index: 10;
            `;

            button.appendChild(ripple);

            setTimeout(() => {
                ripple.remove();
                delete button.dataset.rippling;
            }, 400);
        }

        // 页面加载时初始化
        window.onload = function () {
            // 添加按钮事件监听（仅用于视觉效果）
            document.querySelectorAll('.download-btn').forEach(btn => {
                btn.addEventListener('click', createRipple);
            });

            // 启动鼠标效果
            initMouseEffect();
        };
    </script>
</body>

</html>